﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace GanFeng.Forest.WebApi.Objects
{
    /// <summary>
    /// Mes 配方明细
    /// </summary>
    public class MesRecipeArgsDetail
    {
        /// <summary>
        /// 工步序号，如工步1、工步2
        /// </summary>
        /// <remarks>取值范围：1 - 16</remarks>
        [JsonPropertyName("step_serial_number")]
        public byte StepSerialNumber { get; set; }
        /// <summary>
        /// 原材料码
        /// </summary>
        [JsonPropertyName("material_code")]
        public short MaterialCode { get; set; }
        /// <summary>
        /// 原材料重量（KG）
        /// </summary>
        [JsonPropertyName("material_weight")]
        public float MaterialWeight { get; set; }
        /// <summary>
        /// 分散转速设定（rpm）
        /// </summary>
        [JsonPropertyName("scattered_rotate_speed")]
        public short ScatteredRotateSpeed { get; set; }
        /// <summary>
        /// 搅拌转速设定（rpm）
        /// </summary>
        [JsonPropertyName("stir_rotate_speed")]
        public short StirRotateSpeed { get; set; }
        /// <summary>
        /// 运行时间设定（分钟）
        /// </summary>
        [JsonPropertyName("elapsed_time")]
        public short ElapsedTime { get; set; }
        /// <summary>
        /// 真空设定（Mpa）
        /// </summary>
        [JsonPropertyName("vacuum")]
        public float Vacuum { get; set; }
        /// <summary>
        /// 温度设定
        /// </summary>
        [JsonPropertyName("temperature")]
        public float Temperature { get; set; }
        /// <summary>
        /// 搅拌方向是否反转。True: 反转；false: 正转
        /// </summary>
        /// <remarks>
        /// True: 反转；false: 正转
        /// </remarks>
        [JsonPropertyName("stir_direction")]
        public bool StirDirectionIsReverse { get; set; }
        /// <summary>
        /// 功能码
        /// </summary>
        /// <remarks>
        /// <list type="table">
        /// <item><term>0</term><description>结束确认</description></item>
        /// <item><term>1</term><description>自动下步</description></item>
        /// <item><term>2</term><description>慢速搅拌</description></item>
        /// </list>
        /// </remarks>
        [JsonPropertyName("function_code")]
        public short FunctionCode { get; set; }
        /// <summary>
        /// 配方结束码
        /// </summary>
        /// <remarks>
        /// 如果为 true，即使后续有设定工步，也不会再执行
        /// </remarks>
        [JsonPropertyName("end_symbol")]
        public bool EndSymbol { get; set; }
    }
}
